<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Class: tinymce.ui.NativeListBox</title>
<meta name="generator" content="MoxieDoc" />

<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/grids.css" />
<link rel="stylesheet" type="text/css" href="css/general.css" />

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
	google.load("jquery", "1.3");
</script>
<script type="text/javascript" src="js/jquery.treeview.min.js"></script>
<script type="text/javascript" src="js/general.js"></script>
</head>
<body>
<div class="classDetailsContent">
<h1>tinymce.ui.NativeListBox</h1>
<table class="classDetails">
<tr>
<td class="first">Namespace</td>
<td class="last">tinymce.ui</td>
</tr>
<tr>
<td class="first">Class</td>
<td class="last">NativeListBox</td>
</tr>
<tr>
<td class="first">Inheritance</td>
<td class="last inheritageList">
<span>NativeListBox</span>
<span>
<a href="class_tinymce.ui.ListBox.html">ListBox</a>
</span>
<span class="last">
<a href="class_tinymce.ui.Control.html">Control</a>
</span>
</td>
</tr>
</table>
<div class="classDescription">This class is used to create list boxes/select list. This one will generate
a native control the way that the browser produces them by default.
</div>
<div class="summaryLists">
<h2>Public Properties</h2>
<table class="Properties summary">
<thead>
<tr>
<th>Property</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr class="inherited">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.ListBox.html#items">items</a> : Array</div>
<div class="summary">Array of ListBox items.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.ListBox.html">ListBox</a>
</td>
</tr>
</tbody>
</table>
<h2>Public Methods</h2>
<table class="Methods summary">
<thead>
<tr>
<th>Method</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.NativeListBox.html#NativeListBox">NativeListBox</a>(id:String, s:Object)</div>
<div class="summary">Constructs a new button control instance.</div>
</td>
<td class="last">NativeListBox</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.NativeListBox.html#add">add</a>(n:String, v:String, o:Object):void</div>
<div class="summary">Adds a option item to the list box.</div>
</td>
<td class="last">NativeListBox</td>
</tr>
<tr class="inherited">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.ListBox.html#destroy">destroy</a>():void</div>
<div class="summary">Destroys the ListBox i.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.ListBox.html">ListBox</a>
</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.NativeListBox.html#getLength">getLength</a>():void</div>
<div class="summary">Executes the specified callback function for the menu item.</div>
</td>
<td class="last">NativeListBox</td>
</tr>
<tr class="inherited">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.ListBox.html#hideMenu">hideMenu</a>():void</div>
<div class="summary">Hides the drop menu.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.ListBox.html">ListBox</a>
</td>
</tr>
<tr class="inherited even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.Control.html#isActive">isActive</a>():Boolean</div>
<div class="summary">Returns true/false if the control is disabled or not.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.Control.html">Control</a>
</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.NativeListBox.html#isDisabled">isDisabled</a>():Boolean</div>
<div class="summary">Returns true/false if the control is disabled or not.</div>
</td>
<td class="last">NativeListBox</td>
</tr>
<tr class="inherited even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.Control.html#isRendered">isRendered</a>():Boolean</div>
<div class="summary">Returns true/false if the control has been rendered or not.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.Control.html">Control</a>
</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.NativeListBox.html#postRender">postRender</a>():void</div>
<div class="summary">Post render handler.</div>
</td>
<td class="last">NativeListBox</td>
</tr>
<tr class="inherited even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.Control.html#remove">remove</a>():void</div>
<div class="summary">Removes the control.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.Control.html">Control</a>
</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.NativeListBox.html#renderHTML">renderHTML</a>():String</div>
<div class="summary">Renders the list box as a HTML string.</div>
</td>
<td class="last">NativeListBox</td>
</tr>
<tr class="inherited even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.ListBox.html#renderMenu">renderMenu</a>():void</div>
<div class="summary">Renders the menu to the DOM.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.ListBox.html">ListBox</a>
</td>
</tr>
<tr class="inherited">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.Control.html#renderTo">renderTo</a>(n:Element):void</div>
<div class="summary">Renders the control to the specified container element.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.Control.html">Control</a>
</td>
</tr>
<tr class="even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.NativeListBox.html#select">select</a>(va:String/function):void</div>
<div class="summary">Selects a item/option by value.</div>
</td>
<td class="last">NativeListBox</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.NativeListBox.html#selectByIndex">selectByIndex</a>(idx:String):void</div>
<div class="summary">Selects a item/option by index.</div>
</td>
<td class="last">NativeListBox</td>
</tr>
<tr class="inherited even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.Control.html#setActive">setActive</a>(s:Boolean):void</div>
<div class="summary">Sets the activated state for the control.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.Control.html">Control</a>
</td>
</tr>
<tr>
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.NativeListBox.html#setDisabled">setDisabled</a>(s:Boolean):void</div>
<div class="summary">Sets the disabled state for the control.</div>
</td>
<td class="last">NativeListBox</td>
</tr>
<tr class="inherited even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.Control.html#setState">setState</a>(c:String, s:Boolean):void</div>
<div class="summary">Sets the specified class state for the control.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.Control.html">Control</a>
</td>
</tr>
<tr class="inherited">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.ListBox.html#showMenu">showMenu</a>():void</div>
<div class="summary">Displays the drop menu with all items.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.ListBox.html">ListBox</a>
</td>
</tr>
</tbody>
</table>
<h2>Public Events</h2>
<table class="Events summary">
<thead>
<tr>
<th>Event</th>
<th>Defined By</th>
</tr>
</thead>
<tbody>
<tr class="inherited">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.ListBox.html#onAdd">onAdd</a>()</div>
<div class="summary">Fires when a new item is added.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.ListBox.html">ListBox</a>
</td>
</tr>
<tr class="inherited even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.ListBox.html#onChange">onChange</a>()</div>
<div class="summary">Fires when the selection has been changed.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.ListBox.html">ListBox</a>
</td>
</tr>
<tr class="inherited">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.ListBox.html#onPostRender">onPostRender</a>()</div>
<div class="summary">Fires after the element has been rendered to DOM.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.ListBox.html">ListBox</a>
</td>
</tr>
<tr class="inherited even">
<td class="first">
<div>
<a class="memberName" href="class_tinymce.ui.ListBox.html#onRenderMenu">onRenderMenu</a>()</div>
<div class="summary">Fires when the menu gets rendered.</div>
</td>
<td class="last">
<a href="class_tinymce.ui.ListBox.html">ListBox</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="detailsList">
<div class="details">
<h2>Method details</h2>
<div class="memberDetails" id="NativeListBox">
<h3>NativeListBox<span class="memberType">constructor</span>
</h3>
<code class="syntax">public 
						function NativeListBox(id:String, s:Object)</code>
<div class="memberDescription">Constructs a new button control instance.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">id:String</td>
<td class="last">Button control id for the button.</td>
</tr>
<tr>
<td class="first">s:Object</td>
<td class="last">Optional name/value settings object.</td>
</tr>
</table>
</div>
<div class="memberDetails" id="add">
<h3>add<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function add(n:String, v:String, o:Object):void</code>
<div class="memberDescription">Adds a option item to the list box.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">n:String</td>
<td class="last">Title for the new option.</td>
</tr>
<tr>
<td class="first">v:String</td>
<td class="last">Value for the new option.</td>
</tr>
<tr>
<td class="first">o:Object</td>
<td class="last">Optional object with settings like for example class.</td>
</tr>
</table>
</div>
<div class="memberDetails" id="getLength">
<h3>getLength<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function getLength():void</code>
<div class="memberDescription">Executes the specified callback function for the menu item. In this case when the user clicks the menu item.
</div>
</div>
<div class="memberDetails" id="isDisabled">
<h3>isDisabled<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function isDisabled():Boolean</code>
<div class="memberDescription">Returns true/false if the control is disabled or not. This is a method since you can then
choose to check some class or some internal bool state in subclasses.
</div>
<h4>Returns</h4>
<div class="returns">Boolean - true/false if the control is disabled or not.</div>
</div>
<div class="memberDetails" id="postRender">
<h3>postRender<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function postRender():void</code>
<div class="memberDescription">Post render handler. This function will be called after the UI has been
rendered so that events can be added.
</div>
</div>
<div class="memberDetails" id="renderHTML">
<h3>renderHTML<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function renderHTML():String</code>
<div class="memberDescription">Renders the list box as a HTML string. This method is much faster than using the DOM and when
creating a whole toolbar with buttons it does make a lot of difference.
</div>
<h4>Returns</h4>
<div class="returns">String - HTML for the list box control element.</div>
</div>
<div class="memberDetails" id="select">
<h3>select<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function select(va:String/function):void</code>
<div class="memberDescription">Selects a item/option by value. This will both add a visual selection to the
item and change the title of the control to the title of the option.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">va:String/function</td>
<td class="last">Value to look for inside the list box or a function selector.</td>
</tr>
</table>
</div>
<div class="memberDetails" id="selectByIndex">
<h3>selectByIndex<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function selectByIndex(idx:String):void</code>
<div class="memberDescription">Selects a item/option by index. This will both add a visual selection to the
item and change the title of the control to the title of the option.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">idx:String</td>
<td class="last">Index to select, pass -1 to select menu/title of select box.</td>
</tr>
</table>
</div>
<div class="memberDetails last" id="setDisabled">
<h3>setDisabled<span class="memberType">method</span>
</h3>
<code class="syntax">public 
						function setDisabled(s:Boolean):void</code>
<div class="memberDescription">Sets the disabled state for the control. This will add CSS classes to the
element that contains the control. So that it can be disabled visually.
</div>
<h4>Parameters</h4>
<table class="params">
<tr>
<td class="first">s:Boolean</td>
<td class="last">Boolean state if the control should be disabled or not.</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</body>
</html>
